package main

import "fmt"

//go for range的使用
func main() {

	heros := [...]string{"宋江", "鲁智深", "武松"}

	fmt.Printf("heros value %v heros addr %p\n", heros, &heros)
	fmt.Printf("heros[0] value %v heros[0] addr %p\n", heros[0], &heros[0])
	fmt.Printf("heros[1] value %v heros[1] addr %p\n", heros[1], &heros[1])

	fmt.Printf("%T", heros)
	fmt.Println()

	for i, v := range heros {
		fmt.Printf("index %v value %v addr %p\n", i, v, &v)
	}
}
